Invisible Agent - CLI
Overview
The DevAssure Invisible (QA) Agent CLI is a command-line interface designed to execute end-to-end UI tests based on natural language instructions and CSV files. You can use the CLI to run tests directly from your terminal or integrate them seamlessly into CI/CD pipelines.
Prerequisites
- Node.js 18+
Installation & Setup
Install
Install the Agent CLI globally using npm.
npm install -g devassureLogin & Run
Login into your DevAssure account and execute tests.
devassure login
devassure run-testsUpgrade
New versions of the Agent CLI are released regularly. To upgrade with npm, run.
npm install -g devassure@latest- Install the package globally to access the devassure command from anywhere:
# Using npm
npm install -g @devassure/cli
# Using pnpm
pnpm add -g @devassure/cli
- Verify the installation:
devassure version
Detailed package information and the official registry entry can be found here: @devassure/cli
Authenticate with DevAssure:
devassure login
- This opens your browser for OAuth2 authentication.
For headless environments, add an authentication token directly instead:
devassure add-token
Generate tokens at app.devassure.io.Please refer here for token generation
Initialize Your Project
devassure init
This will:
- Create a
.devassure/folder with configuration files - Prompt you for your app URL, description, and personas
- Generates a sample test file to get you started
Add Test Cases
- Add
.yamlfiles under.devassure/tests/. Each file needs at minimum asummaryandsteps.
# .devassure/tests/sample-test.yaml
summary: Sample test case
steps:
- Open the application url
- Verify if the page loads successfully
- Verify if there are no error messages
priority: P0
tags:
- sanity
- app-load
Run Tests
devassure run-tests
# or use the alias
devassure run
Add Test Data
Add environment-specific URLs, credentials, and data to .devassure/test_data.yaml:
default:
url: 'http://localhost:3000'
users:
default:
user_name: '[email protected]'
password: 12345678
admin:
user_name: '[email protected]'
password: 12345678